using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.Query;

namespace NBusiness.Data
{
	[Serializable]
	public abstract class CriteriaBase
	{
        private int _startIndex = 0;
        public int StartIndex
        {
            get { return _startIndex; }
        }
        private int _maxEntities = -1;
        public int MaxEntities
        {
            get { return _maxEntities; }
        }
        private string _sortField;
        public string SortField
        {
            get { return _sortField; }
        }
        private SortOrder _sortOrder;
        public SortOrder SortOrder
        {
            get { return _sortOrder; }
        }

        private int _totalEntities = 1;
        public int TotalEntities
        {
            get { return _totalEntities; }
            set { _totalEntities = value; }
        }

        protected CriteriaBase() 
            : this(0, -1)
        { }
        protected CriteriaBase(int startIndex, int maxEntities)
            : this(startIndex, maxEntities, null, SortOrder.None)
        { }
        protected CriteriaBase(int startIndex, int maxEntities, string sortField, SortOrder sortOrder)
        {
            _startIndex = startIndex;
            _maxEntities = maxEntities;
            _sortField = sortField;
            _sortOrder = sortOrder;
        }
	}
}
